package com.example.psychologicalappointmentsystem.Object;

import com.example.psychologicalappointmentsystem.Enum.OrderStatus;
import com.example.psychologicalappointmentsystem.Enum.OrderType;
import com.example.psychologicalappointmentsystem.Enum.PaymentStatus;
import com.example.psychologicalappointmentsystem.common.ParamCheck;
import lombok.Data;

import java.util.Date;

@Data
public class OrderVO extends PageRequest {
    private Long id;
    private Long userId; //用户id
    private Long consultantId; //咨询师id
    private Date startTime;
    private Date endTime;
    private OrderStatus status;// '订单状态：0-待确认,1-已预约,2-已取消,3-已完成,4-已过期',
    private Long fee; // '咨询费用（单位：元）',
    private PaymentStatus paymentStatus; //'支付状态：0-未支付,1-已支付,2-退款中,3-已退款',
    private String paymentMethod; //'支付方式（如：微信、支付宝、银行卡）',
    private String transactionId; //'第三方支付平台交易号'
    private Date createdDate;//'订单创建时间',
    private Date updatedDate;// '最后更新时间',
    private String remark; // '用户备注（如特殊需求）',
    private String orderType; // '订单类型：0-线下，1-线上',
    private String canceledMsg;
    private String nickName;


    public void checkAdd(){
        ParamCheck.mustNonNull(userId, "用户id 不能为空");
        ParamCheck.mustNonNull(consultantId, "咨询师id 不能为空");
        ParamCheck.mustNonNull(fee, "价格 不能为空");
        ParamCheck.mustNonNull(orderType, "订单类型 不能为空");
    }

    public void checkOrderId() {
        ParamCheck.mustNonNull(id, "订单ID 不能为空");
    }
}
